home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-09-04 | 5.1 KB | [TEXT/ALFA] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sun Sep 4 22:55:31 1994, modified Sun Sep 4 22:55:31 1994, creator Alpha editor, type ASCII, 4610 bytes "getVarValue.tcl" , at 0x1282 382 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [ALFA] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 67 65 74 56 61 72 | 56 61 6c 75 65 2e 74 63 |..getVar|Value.tc|
|00000010| 6c 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |l.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 41 4c 46 | 41 01 00 00 00 00 00 00 |.TEXTALF|A.......|
|00000050| 00 00 00 00 00 12 02 00 | 00 01 7e aa 90 39 23 aa |........|..~..9#.|
|00000060| 90 39 23 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.9#.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 0f b9 00 00 |........|........|
|00000080| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000090| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000000a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000000b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000000c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 0d 23 20 |########|#####.# |
|000000d0| 20 52 65 70 6f 72 74 20 | 74 68 65 20 63 75 72 72 | Report |the curr|
|000000e0| 65 6e 74 20 76 61 6c 75 | 65 20 6f 66 20 61 20 67 |ent valu|e of a g|
|000000f0| 6c 6f 62 61 6c 20 76 61 | 72 69 61 62 6c 65 2c 20 |lobal va|riable, |
|00000100| 63 68 6f 73 65 6e 20 69 | 6e 74 65 72 61 63 74 69 |chosen i|nteracti|
|00000110| 76 65 6c 79 0d 23 20 20 | 66 72 6f 6d 20 61 20 6c |vely.# |from a l|
|00000120| 69 73 74 20 6f 66 20 61 | 6c 6c 20 61 63 74 69 76 |ist of a|ll activ|
|00000130| 65 20 76 61 72 69 61 62 | 6c 65 73 2e 0d 23 0d 23 |e variab|les..#.#|
|00000140| 20 20 49 66 20 74 68 65 | 20 76 61 72 69 61 62 6c | If the| variabl|
|00000150| 65 20 69 73 20 61 6e 20 | 61 72 72 61 79 2c 20 6f |e is an |array, o|
|00000160| 72 20 69 74 73 20 76 61 | 6c 75 65 20 69 73 20 74 |r its va|lue is t|
|00000170| 6f 6f 20 62 69 67 20 74 | 6f 20 66 69 74 20 69 6e |oo big t|o fit in|
|00000180| 20 61 6e 20 0d 23 20 20 | 61 6c 65 72 74 6e 6f 74 | an .# |alertnot|
|00000190| 65 2c 20 74 68 65 6e 20 | 69 74 73 20 63 6f 6e 74 |e, then |its cont|
|000001a0| 65 6e 74 73 20 61 72 65 | 20 6c 69 73 74 65 64 20 |ents are| listed |
|000001b0| 69 6e 20 61 20 6e 65 77 | 20 77 69 6e 64 6f 77 2c |in a new| window,|
|000001c0| 20 6f 74 68 65 72 77 69 | 73 65 20 0d 23 20 20 74 | otherwi|se .# t|
|000001d0| 68 65 20 76 61 72 69 61 | 62 6c 65 27 73 20 76 61 |he varia|ble's va|
|000001e0| 6c 75 65 20 69 73 20 64 | 69 73 70 6c 61 79 65 64 |lue is d|isplayed|
|000001f0| 20 69 6e 20 61 6e 20 61 | 6c 65 72 74 6e 6f 74 65 | in an a|lertnote|
|00000200| 2e 0d 23 0d 70 72 6f 63 | 20 67 65 74 56 61 72 56 |..#.proc| getVarV|
|00000210| 61 6c 75 65 20 7b 7d 20 | 7b 0d 20 20 20 20 73 65 |alue {} |{. se|
|00000220| 74 20 76 61 6c 20 5b 6c | 69 73 74 70 69 63 6b 20 |t val [l|istpick |
|00000230| 2d 70 20 7b 57 68 69 63 | 68 20 76 61 72 3f 7d 20 |-p {Whic|h var?} |
|00000240| 5b 6c 73 6f 72 74 20 2d | 69 67 6e 6f 72 65 20 5b |[lsort -|ignore [|
|00000250| 69 6e 66 6f 20 67 6c 6f | 62 61 6c 73 5d 5d 5d 0d |info glo|bals]]].|
|00000260| 20 20 20 20 69 66 20 7b | 21 5b 73 74 72 69 6e 67 | if {|![string|
|00000270| 20 6c 65 6e 67 74 68 20 | 24 76 61 6c 5d 7d 20 72 | length |$val]} r|
|00000280| 65 74 75 72 6e 0d 20 20 | 20 20 67 6c 6f 62 61 6c |eturn. | global|
|00000290| 20 24 76 61 6c 0d 20 20 | 20 20 69 66 20 7b 21 5b | $val. | if {![|
|000002a0| 63 61 74 63 68 20 7b 73 | 65 74 20 24 76 61 6c 7d |catch {s|et $val}|
|000002b0| 20 76 61 6c 75 65 5d 7d | 20 7b 0d 20 20 20 20 20 | value]}| {. |
|000002c0| 20 20 20 69 66 20 7b 21 | 5b 63 61 74 63 68 20 7b | if {!|[catch {|
|000002d0| 61 6c 65 72 74 6e 6f 74 | 65 20 22 27 24 76 61 6c |alertnot|e "'$val|
|000002e0| 27 20 3d 20 24 76 61 6c | 75 65 22 7d 5d 7d 20 7b |' = $val|ue"}]} {|
|000002f0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 72 65 74 |. | ret|
|00000300| 75 72 6e 0d 20 20 20 20 | 20 20 20 20 7d 20 65 6c |urn. | } el|
|00000310| 73 65 20 7b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |se {. | |
|00000320| 20 6e 65 77 20 2d 6e 20 | 22 2a 20 24 76 61 6c 20 | new -n |"* $val |
|00000330| 2a 22 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 69 |*". | i|
|00000340| 6e 73 65 72 74 54 65 78 | 74 20 22 27 24 76 61 6c |nsertTex|t "'$val|
|00000350| 27 20 3d 20 24 76 61 6c | 75 65 22 0d 20 20 20 20 |' = $val|ue". |
|00000360| 20 20 20 20 7d 0d 20 20 | 20 20 7d 20 65 6c 73 65 | }. | } else|
|00000370| 20 7b 0d 20 20 20 20 20 | 20 20 20 6e 65 77 20 2d | {. | new -|
|00000380| 6e 20 22 2a 20 24 76 61 | 6c 20 2a 22 0d 23 20 20 |n "* $va|l *".# |
|00000390| 20 20 20 20 20 20 69 6e | 73 65 72 74 54 65 78 74 | in|sertText|
|000003a0| 20 22 27 24 76 61 6c 27 | 20 3d 5c 72 22 0d 20 20 | "'$val'| =\r". |
|000003b0| 20 20 20 20 20 20 6c 69 | 73 74 41 72 72 61 79 20 | li|stArray |
|000003c0| 24 76 61 6c 0d 20 20 20 | 20 7d 0d 20 20 20 20 67 |$val. | }. g|
|000003d0| 6f 74 6f 20 30 0d 23 20 | 69 66 20 27 73 68 72 69 |oto 0.# |if 'shri|
|000003e0| 6e 6b 57 69 6e 64 6f 77 | 27 20 69 73 20 6c 6f 61 |nkWindow|' is loa|
|000003f0| 64 65 64 2c 20 63 61 6c | 6c 20 69 74 20 74 6f 20 |ded, cal|l it to |
|00000400| 74 72 69 6d 20 74 68 65 | 20 6f 75 74 70 75 74 20 |trim the| output |
|00000410| 77 69 6e 64 6f 77 2e 0d | 20 20 20 63 61 74 63 68 |window..| catch|
|00000420| 20 7b 73 68 72 69 6e 6b | 57 69 6e 64 6f 77 20 31 | {shrink|Window 1|
|00000430| 7d 0d 20 20 20 73 65 74 | 20 77 69 6e 20 5b 6c 69 |}. set| win [li|
|00000440| 6e 64 65 78 20 5b 77 69 | 6e 4e 61 6d 65 73 20 2d |ndex [wi|nNames -|
|00000450| 66 5d 20 30 5d 0d 20 20 | 20 73 65 74 57 69 6e 49 |f] 0]. | setWinI|
|00000460| 6e 66 6f 20 2d 77 20 24 | 77 69 6e 20 64 69 72 74 |nfo -w $|win dirt|
|00000470| 79 20 30 0d 7d 0d 0d 23 | 23 23 23 23 23 23 23 23 |y 0.}..#|########|
|00000480| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000490| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000004a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000004b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000004c0| 23 23 23 23 0d 23 20 20 | 4c 69 73 74 20 74 68 65 |####.# |List the|
|000004d0| 20 6e 61 6d 65 20 61 6e | 64 20 76 61 6c 75 65 20 | name an|d value |
|000004e0| 6f 66 20 65 61 63 68 20 | 65 6c 65 6d 65 6e 74 20 |of each |element |
|000004f0| 6f 66 20 74 68 65 20 61 | 72 72 61 79 20 24 61 72 |of the a|rray $ar|
|00000500| 72 4e 61 6d 65 2e 0d 23 | 20 20 28 43 6f 6e 76 65 |rName..#| (Conve|
|00000510| 6e 69 65 6e 74 20 74 6f | 20 75 73 65 20 61 73 20 |nient to| use as |
|00000520| 61 20 73 68 65 6c 6c 20 | 63 6f 6d 6d 61 6e 64 2e |a shell |command.|
|00000530| 29 0d 23 0d 70 72 6f 63 | 20 6c 69 73 74 41 72 72 |).#.proc| listArr|
|00000540| 61 79 20 7b 61 72 72 4e | 61 6d 65 7d 20 7b 0d 20 |ay {arrN|ame} {. |
|00000550| 20 20 20 67 6c 6f 62 61 | 6c 20 24 61 72 72 4e 61 | globa|l $arrNa|
|00000560| 6d 65 0d 20 20 20 20 73 | 65 74 20 6c 69 6e 65 73 |me. s|et lines|
|00000570| 20 7b 7d 0d 20 20 20 20 | 69 66 20 7b 21 5b 63 61 | {}. |if {![ca|
|00000580| 74 63 68 20 7b 69 6e 66 | 6f 20 76 61 72 73 20 24 |tch {inf|o vars $|
|00000590| 61 72 72 4e 61 6d 65 7d | 5d 7d 20 7b 0d 20 20 20 |arrName}|]} {. |
|000005a0| 20 20 20 20 20 66 6f 72 | 65 61 63 68 20 6e 6d 20 | for|each nm |
|000005b0| 5b 61 72 72 61 79 20 6e | 61 6d 65 73 20 24 61 72 |[array n|ames $ar|
|000005c0| 72 4e 61 6d 65 5d 20 7b | 0d 20 20 20 20 20 20 20 |rName] {|. |
|000005d0| 20 20 20 20 20 73 65 74 | 20 76 61 6c 20 5b 65 78 | set| val [ex|
|000005e0| 70 72 20 5c 24 24 61 72 | 72 4e 61 6d 65 5c 28 24 |pr \$$ar|rName\($|
|000005f0| 6e 6d 5c 29 5d 0d 20 20 | 20 20 20 20 20 20 20 20 |nm\)]. | |
|00000600| 20 20 61 70 70 65 6e 64 | 20 6c 69 6e 65 73 20 22 | append| lines "|
|00000610| 5c 72 5c 22 24 6e 6d 5c | 22 5c 74 5c 7b 24 76 61 |\r\"$nm\|"\t\{$va|
|00000620| 6c 5c 7d 22 0d 20 20 20 | 20 20 20 20 20 7d 0d 20 |l\}". | }. |
|00000630| 20 20 20 20 20 20 20 69 | 6e 73 65 72 74 54 65 78 | i|nsertTex|
|00000640| 74 20 24 6c 69 6e 65 73 | 0d 20 20 20 20 7d 20 65 |t $lines|. } e|
|00000650| 6c 73 65 20 7b 0d 20 20 | 20 20 20 20 20 20 61 6c |lse {. | al|
|00000660| 65 72 74 6e 6f 74 65 20 | 22 5c 22 24 61 72 72 4e |ertnote |"\"$arrN|
|00000670| 61 6d 65 5c 22 20 64 6f | 65 73 6e 27 74 20 65 78 |ame\" do|esn't ex|
|00000680| 69 73 74 20 69 6e 20 74 | 68 69 73 20 63 6f 6e 74 |ist in t|his cont|
|00000690| 65 78 74 22 0d 20 20 20 | 20 7d 0d 7d 0d 0d 23 23 |ext". | }.}..##|
|000006a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000006b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000006c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000006d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000006e0| 23 23 23 23 23 23 23 23 | 23 23 23 0d 23 20 20 57 |########|###.# W|
|000006f0| 72 69 74 65 20 6f 75 74 | 20 74 68 65 20 61 63 74 |rite out| the act|
|00000700| 69 76 65 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 6f |ive defi|nition o|
|00000710| 66 20 74 68 65 20 70 72 | 6f 63 20 24 70 72 6f 63 |f the pr|oc $proc|
|00000720| 4e 61 6d 65 2e 0d 23 20 | 20 28 43 6f 6e 76 65 6e |Name..# | (Conven|
|00000730| 69 65 6e 74 20 74 6f 20 | 75 73 65 20 61 73 20 61 |ient to |use as a|
|00000740| 20 73 68 65 6c 6c 20 63 | 6f 6d 6d 61 6e 64 2e 29 | shell c|ommand.)|
|00000750| 0d 23 0d 70 72 6f 63 20 | 6c 69 73 74 50 72 6f 63 |.#.proc |listProc|
|00000760| 20 7b 70 72 6f 63 4e 61 | 6d 65 7d 20 7b 0d 20 20 | {procNa|me} {. |
|00000770| 20 20 73 65 74 20 6c 69 | 6e 65 73 20 7b 7d 0d 20 | set li|nes {}. |
|00000780| 20 20 20 69 66 20 7b 21 | 5b 63 61 74 63 68 20 7b | if {!|[catch {|
|00000790| 69 6e 66 6f 20 70 72 6f | 63 73 20 22 2a 24 70 72 |info pro|cs "*$pr|
|000007a0| 6f 63 4e 61 6d 65 2a 22 | 7d 20 70 72 6f 63 4c 69 |ocName*"|} procLi|
|000007b0| 73 74 5d 7d 20 7b 0d 20 | 20 20 20 20 20 20 20 66 |st]} {. | f|
|000007c0| 6f 72 65 61 63 68 20 70 | 20 24 70 72 6f 63 4c 69 |oreach p| $procLi|
|000007d0| 73 74 20 7b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |st {. | |
|000007e0| 20 73 65 74 20 70 61 72 | 67 73 20 5b 69 6e 66 6f | set par|gs [info|
|000007f0| 20 61 72 67 73 20 24 70 | 5d 0d 20 20 20 20 20 20 | args $p|]. |
|00000800| 20 20 20 20 20 20 73 65 | 74 20 61 72 67 6c 69 73 | se|t arglis|
|00000810| 74 20 7b 7d 0d 20 20 20 | 20 20 20 20 20 20 20 20 |t {}. | |
|00000820| 20 66 6f 72 65 61 63 68 | 20 61 20 24 70 61 72 67 | foreach| a $parg|
|00000830| 73 20 7b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |s {. | |
|00000840| 09 69 66 20 7b 5b 69 6e | 66 6f 20 64 65 66 61 75 |.if {[in|fo defau|
|00000850| 6c 74 20 24 70 20 24 61 | 20 64 65 66 5d 7d 20 7b |lt $p $a| def]} {|
|00000860| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 09 09 61 |. | ..a|
|00000870| 70 70 65 6e 64 20 61 72 | 67 6c 69 73 74 20 22 20 |ppend ar|glist " |
|00000880| 7b 24 61 20 24 64 65 66 | 7d 22 20 0d 09 20 20 20 |{$a $def|}" .. |
|00000890| 20 20 20 20 20 20 20 20 | 20 7d 20 65 6c 73 65 20 | | } else |
|000008a0| 7b 0d 09 20 20 20 20 20 | 20 20 20 20 20 20 20 09 |{.. | .|
|000008b0| 61 70 70 65 6e 64 20 61 | 72 67 6c 69 73 74 20 22 |append a|rglist "|
|000008c0| 20 24 61 22 0d 09 20 20 | 20 20 20 20 20 20 20 20 | $a".. | |
|000008d0| 20 20 7d 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | }. | |
|000008e0| 7d 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 61 70 |}. | ap|
|000008f0| 70 65 6e 64 20 6c 69 6e | 65 73 20 22 5c 72 70 72 |pend lin|es "\rpr|
|00000900| 6f 63 20 24 70 20 7b 5b | 73 74 72 69 6e 67 20 74 |oc $p {[|string t|
|00000910| 72 69 6d 20 24 61 72 67 | 6c 69 73 74 5d 7d 20 7b |rim $arg|list]} {|
|00000920| 22 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 61 70 |". | ap|
|00000930| 70 65 6e 64 20 6c 69 6e | 65 73 20 5b 69 6e 66 6f |pend lin|es [info|
|00000940| 20 62 6f 64 79 20 24 70 | 5d 0d 20 20 20 20 20 20 | body $p|]. |
|00000950| 20 20 20 20 20 20 61 70 | 70 65 6e 64 20 6c 69 6e | ap|pend lin|
|00000960| 65 73 20 22 7d 5c 72 22 | 0d 20 20 20 20 20 20 20 |es "}\r"|. |
|00000970| 20 7d 0d 20 20 20 20 20 | 20 20 20 69 6e 73 65 72 | }. | inser|
|00000980| 74 54 65 78 74 20 24 6c | 69 6e 65 73 0d 20 20 20 |tText $l|ines. |
|00000990| 20 7d 0d 7d 0d 0d 23 23 | 23 23 23 23 23 23 23 23 | }.}..##|########|
|000009a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000009b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000009c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000009d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000009e0| 23 23 23 0d 23 20 41 64 | 6a 75 73 74 20 74 68 65 |###.# Ad|just the|
|000009f0| 20 64 69 6d 65 6e 73 69 | 6f 6e 73 20 6f 66 20 74 | dimensi|ons of t|
|00000a00| 68 65 20 63 75 72 72 65 | 6e 74 20 77 69 6e 64 6f |he curre|nt windo|
|00000a10| 77 20 74 6f 20 6d 61 74 | 63 68 20 74 68 65 20 6c |w to mat|ch the l|
|00000a20| 65 6e 67 74 68 20 28 61 | 6e 64 20 0d 23 20 6f 70 |ength (a|nd .# op|
|00000a30| 74 69 6f 6e 61 6c 6c 79 | 20 74 68 65 20 77 69 64 |tionally| the wid|
|00000a40| 74 68 29 20 6f 66 20 74 | 68 65 20 74 65 78 74 20 |th) of t|he text |
|00000a50| 74 68 61 74 20 69 74 20 | 63 6f 6e 74 61 69 6e 73 |that it |contains|
|00000a60| 2e 20 20 49 66 20 73 68 | 72 69 6e 6b 57 69 64 74 |. If sh|rinkWidt|
|00000a70| 68 20 69 73 20 0d 23 20 | 6f 6d 69 74 74 65 64 20 |h is .# |omitted |
|00000a80| 6f 72 20 73 65 74 20 74 | 6f 20 7a 65 72 6f 2c 20 |or set t|o zero, |
|00000a90| 74 68 65 6e 20 6f 6e 6c | 79 20 74 68 65 20 68 65 |then onl|y the he|
|00000aa0| 69 67 68 74 20 6f 66 20 | 74 68 65 20 77 69 6e 64 |ight of |the wind|
|00000ab0| 6f 77 20 69 73 20 61 64 | 6a 75 73 74 65 64 2e 0d |ow is ad|justed..|
|00000ac0| 23 20 28 46 69 6e 64 69 | 6e 67 20 74 68 65 20 6d |# (Findi|ng the m|
|00000ad0| 61 78 69 6d 75 6d 20 6e | 75 6d 62 65 72 20 6f 66 |aximum n|umber of|
|00000ae0| 20 63 68 61 72 61 63 74 | 65 72 73 20 70 65 72 20 | charact|ers per |
|00000af0| 6c 69 6e 65 20 63 61 6e | 20 62 65 20 61 6e 6e 6f |line can| be anno|
|00000b00| 79 69 6e 67 6c 79 0d 23 | 20 74 69 6d 65 2d 63 6f |yingly.#| time-co|
|00000b10| 6e 73 75 6d 69 6e 67 20 | 66 6f 72 20 6c 61 72 67 |nsuming |for larg|
|00000b20| 65 20 66 69 6c 65 73 29 | 2e 0d 0d 70 72 6f 63 20 |e files)|...proc |
|00000b30| 73 68 72 69 6e 6b 57 69 | 6e 64 6f 77 20 7b 7b 73 |shrinkWi|ndow {{s|
|00000b40| 68 72 69 6e 6b 57 69 64 | 74 68 20 30 7d 7d 20 7b |hrinkWid|th 0}} {|
|00000b50| 0d 09 67 6c 6f 62 61 6c | 20 64 65 66 48 65 69 67 |..global| defHeig|
|00000b60| 68 74 20 64 65 66 57 69 | 64 74 68 0d 09 23 20 54 |ht defWi|dth..# T|
|00000b70| 68 65 73 65 20 63 6f 6e | 73 74 61 6e 74 73 20 77 |hese con|stants w|
|00000b80| 6f 72 6b 20 66 6f 72 20 | 39 2d 70 74 20 4d 6f 6e |ork for |9-pt Mon|
|00000b90| 61 63 6f 20 74 79 70 65 | 0d 09 73 65 74 20 6c 69 |aco type|..set li|
|00000ba0| 6e 65 68 74 20 31 31 0d | 09 73 65 74 20 63 68 61 |neht 11.|.set cha|
|00000bb0| 72 77 64 20 36 2e 33 30 | 35 0d 09 0d 09 73 65 74 |rwd 6.30|5....set|
|00000bc0| 20 77 64 20 5b 6c 69 6e | 64 65 78 20 5b 67 65 74 | wd [lin|dex [get|
|00000bd0| 47 65 6f 6d 65 74 72 79 | 5d 20 32 5d 0d 09 73 65 |Geometry|] 2]..se|
|00000be0| 74 20 68 74 20 5b 6c 69 | 6e 64 65 78 20 5b 67 65 |t ht [li|ndex [ge|
|00000bf0| 74 47 65 6f 6d 65 74 72 | 79 5d 20 33 5d 0d 09 73 |tGeometr|y] 3]..s|
|00000c00| 65 74 20 74 6f 70 20 5b | 6c 69 6e 64 65 78 20 5b |et top [|lindex [|
|00000c10| 67 65 74 47 65 6f 6d 65 | 74 72 79 5d 20 31 5d 0d |getGeome|try] 1].|
|00000c20| 09 73 65 74 20 6c 65 66 | 74 20 5b 6c 69 6e 64 65 |.set lef|t [linde|
|00000c30| 78 20 5b 67 65 74 47 65 | 6f 6d 65 74 72 79 5d 20 |x [getGe|ometry] |
|00000c40| 30 5d 0d 23 09 69 66 20 | 7b 24 74 6f 70 20 3c 20 |0].#.if |{$top < |
|00000c50| 36 30 7d 20 74 68 65 6e | 20 7b 73 65 74 20 74 6f |60} then| {set to|
|00000c60| 70 20 36 30 7d 0d 23 09 | 6d 6f 76 65 57 69 6e 20 |p 60}.#.|moveWin |
|00000c70| 24 6c 65 66 74 20 24 74 | 6f 70 0d 09 73 65 74 20 |$left $t|op..set |
|00000c80| 6d 78 68 74 20 5b 65 78 | 70 72 20 5b 6c 69 6e 64 |mxht [ex|pr [lind|
|00000c90| 65 78 20 5b 67 65 74 4d | 61 69 6e 44 65 76 69 63 |ex [getM|ainDevic|
|00000ca0| 65 5d 20 33 5d 20 2d 20 | 24 74 6f 70 20 2d 20 35 |e] 3] - |$top - 5|
|00000cb0| 20 2d 31 35 5d 0d 09 73 | 65 74 20 6d 78 77 64 20 | -15]..s|et mxwd |
|00000cc0| 5b 65 78 70 72 20 5b 6c | 69 6e 64 65 78 20 5b 67 |[expr [l|index [g|
|00000cd0| 65 74 4d 61 69 6e 44 65 | 76 69 63 65 5d 20 32 5d |etMainDe|vice] 2]|
|00000ce0| 20 2d 20 24 6c 65 66 74 | 20 2d 20 35 5d 0d 09 73 | - $left| - 5]..s|
|00000cf0| 65 74 20 6d 6e 68 74 20 | 31 32 30 0d 09 73 65 74 |et mnht |120..set|
|00000d00| 20 6d 6e 77 64 20 32 30 | 30 0d 0d 09 73 65 74 20 | mnwd 20|0...set |
|00000d10| 68 74 57 64 20 5b 66 69 | 6c 65 48 74 57 64 20 24 |htWd [fi|leHtWd $|
|00000d20| 73 68 72 69 6e 6b 57 69 | 64 74 68 5d 0d 09 73 65 |shrinkWi|dth]..se|
|00000d30| 74 20 6c 69 6e 65 73 20 | 5b 6c 69 6e 64 65 78 20 |t lines |[lindex |
|00000d40| 24 68 74 57 64 20 30 5d | 0d 09 73 65 74 20 63 68 |$htWd 0]|..set ch|
|00000d50| 61 72 73 20 5b 6c 69 6e | 64 65 78 20 24 68 74 57 |ars [lin|dex $htW|
|00000d60| 64 20 31 5d 0d 0d 09 69 | 66 20 7b 24 6c 69 6e 65 |d 1]...i|f {$line|
|00000d70| 73 20 3c 3d 20 31 7d 20 | 74 68 65 6e 20 7b 73 65 |s <= 1} |then {se|
|00000d80| 74 20 6c 69 6e 65 73 20 | 31 30 7d 0d 09 0d 09 0d |t lines |10}.....|
|00000d90| 09 69 66 20 7b 24 6c 69 | 6e 65 73 20 3e 20 30 7d |.if {$li|nes > 0}|
|00000da0| 20 7b 0d 09 09 73 65 74 | 20 68 74 20 5b 65 78 70 | {...set| ht [exp|
|00000db0| 72 20 32 32 20 2b 20 28 | 20 24 6c 69 6e 65 68 74 |r 22 + (| $lineht|
|00000dc0| 20 2a 20 28 31 20 2b 20 | 24 6c 69 6e 65 73 29 29 | * (1 + |$lines))|
|00000dd0| 20 5d 0d 09 7d 20 65 6c | 73 65 69 66 20 7b 24 68 | ]..} el|seif {$h|
|00000de0| 74 20 3e 20 24 64 65 66 | 48 65 69 67 68 74 7d 20 |t > $def|Height} |
|00000df0| 7b 0d 09 09 73 65 74 20 | 68 74 20 24 64 65 66 48 |{...set |ht $defH|
|00000e00| 65 69 67 68 74 0d 09 7d | 0d 09 0d 09 69 66 20 7b |eight..}|....if {|
|00000e10| 24 63 68 61 72 73 20 3e | 20 30 7d 20 7b 0d 09 09 |$chars >| 0} {...|
|00000e20| 73 65 74 20 77 64 20 5b | 65 78 70 72 20 33 20 2b |set wd [|expr 3 +|
|00000e30| 20 28 20 24 63 68 61 72 | 77 64 20 2a 20 28 32 20 | ( $char|wd * (2 |
|00000e40| 2b 20 24 63 68 61 72 73 | 29 29 20 5d 0d 09 7d 20 |+ $chars|)) ]..} |
|00000e50| 65 6c 73 65 69 66 20 7b | 24 77 64 20 3e 20 24 64 |elseif {|$wd > $d|
|00000e60| 65 66 57 69 64 74 68 7d | 20 7b 0d 09 09 73 65 74 |efWidth}| {...set|
|00000e70| 20 77 64 20 24 64 65 66 | 57 69 64 74 68 0d 09 7d | wd $def|Width..}|
|00000e80| 0d 09 0d 09 69 66 20 7b | 24 68 74 20 3e 20 24 6d |....if {|$ht > $m|
|00000e90| 78 68 74 7d 20 74 68 65 | 6e 20 7b 73 65 74 20 68 |xht} the|n {set h|
|00000ea0| 74 20 24 6d 78 68 74 7d | 0d 09 69 66 20 7b 24 77 |t $mxht}|..if {$w|
|00000eb0| 64 20 3e 20 24 6d 78 77 | 64 7d 20 74 68 65 6e 20 |d > $mxw|d} then |
|00000ec0| 7b 73 65 74 20 77 64 20 | 24 6d 78 77 64 7d 0d 09 |{set wd |$mxwd}..|
|00000ed0| 69 66 20 7b 24 68 74 20 | 3c 20 24 6d 6e 68 74 7d |if {$ht |< $mnht}|
|00000ee0| 20 74 68 65 6e 20 7b 73 | 65 74 20 68 74 20 24 6d | then {s|et ht $m|
|00000ef0| 6e 68 74 7d 0d 09 69 66 | 20 7b 24 77 64 20 3c 20 |nht}..if| {$wd < |
|00000f00| 24 6d 6e 68 74 7d 20 74 | 68 65 6e 20 7b 73 65 74 |$mnht} t|hen {set|
|00000f10| 20 77 64 20 24 6d 6e 77 | 64 7d 0d 09 73 69 7a 65 | wd $mnw|d}..size|
|00000f20| 57 69 6e 20 24 77 64 20 | 24 68 74 0d 7d 0d 0d 23 |Win $wd |$ht.}..#|
|00000f30| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f40| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f50| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f60| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f70| 23 23 23 23 23 23 23 23 | 23 23 23 23 0d 23 20 52 |########|####.# R|
|00000f80| 65 74 75 72 6e 20 74 68 | 65 20 6e 75 6d 62 65 72 |eturn th|e number|
|00000f90| 20 6f 66 20 6c 69 6e 65 | 73 20 61 6e 64 20 74 68 | of line|s and th|
|00000fa0| 65 20 6d 61 78 69 6d 75 | 6d 20 6e 75 6d 62 65 72 |e maximu|m number|
|00000fb0| 20 6f 66 20 63 68 61 72 | 61 63 74 65 72 73 20 69 | of char|acters i|
|00000fc0| 6e 20 61 6e 79 20 0d 23 | 20 6c 69 6e 65 20 6f 66 |n any .#| line of|
|00000fd0| 20 61 20 66 69 6c 65 2e | 20 20 49 74 20 77 6f 75 | a file.| It wou|
|00000fe0| 6c 64 20 62 65 20 6e 69 | 63 65 20 69 66 20 74 68 |ld be ni|ce if th|
|00000ff0| 65 72 65 20 77 61 73 20 | 61 20 62 75 69 6c 74 2d |ere was |a built-|
|00001000| 69 6e 20 63 6f 6d 6d 61 | 6e 64 20 74 6f 0d 23 20 |in comma|nd to.# |
|00001010| 64 6f 20 74 68 69 73 20 | 28 69 2e 65 2e 2c 20 63 |do this |(i.e., c|
|00001020| 6f 6d 70 69 6c 65 64 20 | 43 20 63 6f 64 65 29 20 |ompiled |C code) |
|00001030| 62 65 63 61 75 73 65 20 | 74 68 69 73 20 69 73 20 |because |this is |
|00001040| 61 20 70 72 65 74 74 79 | 20 73 6c 6f 77 20 77 61 |a pretty| slow wa|
|00001050| 79 20 74 6f 0d 23 20 67 | 65 74 20 74 68 65 20 6d |y to.# g|et the m|
|00001060| 61 78 69 6d 75 6d 20 6c | 69 6e 65 20 77 69 64 74 |aximum l|ine widt|
|00001070| 68 2e 0d 0d 70 72 6f 63 | 20 66 69 6c 65 48 74 57 |h...proc| fileHtW|
|00001080| 64 20 7b 7b 63 68 65 63 | 6b 57 69 64 74 68 20 30 |d {{chec|kWidth 0|
|00001090| 7d 7d 20 7b 0d 09 73 65 | 74 20 74 65 78 74 20 5b |}} {..se|t text [|
|000010a0| 67 65 74 54 65 78 74 20 | 30 20 5b 6d 61 78 50 6f |getText |0 [maxPo|
|000010b0| 73 5d 5d 20 0d 09 0d 09 | 73 65 74 20 6c 69 6e 65 |s]] ....|set line|
|000010c0| 73 20 5b 73 70 6c 69 74 | 20 24 74 65 78 74 20 22 |s [split| $text "|
|000010d0| 5c 72 22 5d 0d 09 73 65 | 74 20 6e 6c 69 6e 65 73 |\r"]..se|t nlines|
|000010e0| 20 5b 6c 6c 65 6e 67 74 | 68 20 24 6c 69 6e 65 73 | [llengt|h $lines|
|000010f0| 5d 0d 09 0d 09 73 65 74 | 20 6c 6c 65 6e 20 30 0d |]....set| llen 0.|
|00001100| 09 69 66 20 7b 24 63 68 | 65 63 6b 57 69 64 74 68 |.if {$ch|eckWidth|
|00001110| 7d 20 7b 0d 09 09 66 6f | 72 65 61 63 68 20 6c 69 |} {...fo|reach li|
|00001120| 6e 65 20 24 6c 69 6e 65 | 73 20 7b 0d 09 09 09 72 |ne $line|s {....r|
|00001130| 65 67 73 75 62 20 7b 09 | 09 09 09 2b b0 2e 2a 24 |egsub {.|...+..*$|
|00001140| 7d 20 24 6c 69 6e 65 20 | 7b 7d 20 6c 69 6e 65 0d |} $line |{} line.|
|00001150| 09 09 09 72 65 67 73 75 | 62 20 7b 09 7d 20 24 6c |...regsu|b {.} $l|
|00001160| 69 6e 65 20 7b 20 20 20 | 20 7d 20 6c 69 6e 65 0d |ine { | } line.|
|00001170| 09 09 09 73 65 74 20 6c | 65 6e 20 5b 73 74 72 69 |...set l|en [stri|
|00001180| 6e 67 20 6c 65 6e 67 74 | 68 20 24 6c 69 6e 65 5d |ng lengt|h $line]|
|00001190| 0d 09 09 09 69 66 20 7b | 5b 73 65 74 20 6e 74 61 |....if {|[set nta|
|000011a0| 62 20 5b 6c 6c 65 6e 67 | 74 68 20 5b 73 70 6c 69 |b [lleng|th [spli|
|000011b0| 74 20 24 6c 69 6e 65 20 | 22 5c 74 22 5d 5d 5d 20 |t $line |"\t"]]] |
|000011c0| 3e 20 31 7d 20 7b 0d 09 | 09 09 09 73 65 74 20 6c |> 1} {..|...set l|
|000011d0| 65 6e 20 5b 65 78 70 72 | 20 24 6c 65 6e 20 2b 20 |en [expr| $len + |
|000011e0| 33 2a 28 24 6e 74 61 62 | 2d 31 29 5d 0d 09 09 09 |3*($ntab|-1)]....|
|000011f0| 7d 0d 09 09 09 69 66 20 | 7b 20 24 6c 65 6e 20 3e |}....if |{ $len >|
|00001200| 20 24 6c 6c 65 6e 7d 20 | 7b 0d 09 09 09 09 73 65 | $llen} |{.....se|
|00001210| 74 20 6c 6c 65 6e 20 24 | 6c 65 6e 0d 09 09 09 7d |t llen $|len....}|
|00001220| 0d 09 09 7d 0d 09 7d 0d | 23 09 61 6c 65 72 74 6e |...}..}.|#.alertn|
|00001230| 6f 74 65 20 22 54 65 78 | 74 20 48 65 69 67 68 74 |ote "Tex|t Height|
|00001240| 20 3a 20 24 6e 6c 69 6e | 65 73 20 3b 20 54 65 78 | : $nlin|es ; Tex|
|00001250| 74 20 57 69 64 74 68 20 | 3a 20 24 6c 6c 65 6e 20 |t Width |: $llen |
|00001260| 22 0d 09 72 65 74 75 72 | 6e 20 5b 6c 69 73 74 20 |"..retur|n [list |
|00001270| 24 6e 6c 69 6e 65 73 20 | 24 6c 6c 65 6e 5d 0d 7d |$nlines |$llen].}|
|00001280| 0d 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001300| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00001310| fc 00 00 2c 89 00 00 00 | 00 60 0f 01 01 00 00 2c |...,....|.`.....,|
|00001320| fb 00 00 00 00 0a 19 01 | 06 00 00 2d 6d 00 00 00 |........|...-m...|
|00001330| 0f 67 65 74 56 61 72 56 | 61 6c 75 65 2e 74 63 6c |.getVarV|alue.tcl|
|00001340| 02 00 02 00 54 45 58 54 | 41 4c 46 41 01 00 ff ff |....TEXT|ALFA....|
|00001350| 02 00 54 45 58 54 41 4c | 46 41 01 00 ff ff ff ff |..TEXTAL|FA......|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 33 62 aa 81 47 4d 00 00 | 12 02 00 00 01 7e 00 30 |3b..GM..|.....~.0|
|00001380| 8b 00 00 00 00 50 55 01 | 2e 00 00 30 fd 00 00 00 |.....PU.|...0....|
|00001390| 00 79 1b 01 33 00 00 31 | 6f 00 00 00 00 2b c8 01 |.y..3..1|o....+..|
|000013a0| 38 00 00 31 e1 00 00 00 | 00 34 df 01 3d 00 00 32 |8..1....|.4..=..2|
|000013b0| 53 00 00 00 00 4f fd 01 | 42 00 00 32 c5 00 00 00 |S....O..|B..2....|
|000013c0| 00 2e a1 01 47 00 00 33 | 37 00 00 00 00 41 74 01 |....G..3|7....At.|
|000013d0| 4c 00 00 33 a9 00 00 00 | 00 45 d2 01 51 00 00 34 |L..3....|.E..Q..4|
|000013e0| 1b 00 00 00 00 44 28 01 | 56 00 00 34 8d 00 00 00 |.....D(.|V..4....|
|000013f0| 00 75 f3 01 5b 00 00 34 | ff 00 00 00 00 24 9c 01 |.u..[..4|.....$..|
|00001400| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 dd |...H..Mo|naco....|
|00001410| c7 30 00 00 00 00 00 f4 | cb fa 00 03 22 52 03 0d |.0......|...."R..|
|00001420| 00 e8 aa c8 00 00 00 04 | 00 04 00 28 00 03 01 ca |........|...(....|
|00001430| 02 79 00 28 00 03 01 ca | 02 79 aa a3 d9 b6 00 00 |.y.(....|.y......|
|00001440| 07 b4 00 00 07 b4 00 00 | 05 a5 01 00 00 00 01 00 |........|........|
|00001450| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 dd c7 30 |...L...L|...2...0|
|00001460| 0c 7e 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.~.....2|..MPSR..|
|00001470| 00 0a 03 ed ff ff 00 00 | 00 00 00 de 12 7c 00 00 |........|.....|..|
+--------+-------------------------+-------------------------+--------+--------+